import {expect, test} from 'bun:test';
import type {AnySegment} from '../parse-result';
import {getSamplesFromMoof} from '../samples-from-moof';
import {toMoofBox} from '../state/iso-base-media/precomputed-moof';

if (process.platform !== 'win32') {
	const defaultSamples: AnySegment = {
		type: 'regular-box',
		boxType: 'moof',
		boxSize: 2336,
		children: [
			{
				type: 'regular-box',
				boxType: 'mfhd',
				boxSize: 16,
				children: [],
				offset: 1121,
			},
			{
				type: 'regular-box',
				boxType: 'traf',
				boxSize: 1272,
				children: [
					{
						type: 'tfhd-box',
						version: 0,
						trackId: 1,
						baseDataOffset: 0,
						baseSampleDescriptionIndex: 0,
						defaultSampleDuration: 62,
						defaultSampleSize: 58926,
						defaultSampleFlags: 16842752,
					},
					{
						type: 'tfdt-box',
						version: 1,
						baseMediaDecodeTime: 26,
						offset: 1173,
					},
					{
						type: 'trun-box',
						version: 0,
						sampleCount: 15,
						dataOffset: 2344,
						firstSampleFlags: 33554432,
						samples: [
							{
								sampleDuration: 62,
								sampleSize: 58926,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 1,
								sampleSize: 61381,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 2,
								sampleSize: 72911,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 11,
								sampleSize: 44270,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 15,
								sampleSize: 33770,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 23,
								sampleSize: 24302,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 22,
								sampleSize: 22624,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 23,
								sampleSize: 18746,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 22,
								sampleSize: 23021,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 19,
								sampleSize: 25599,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 23,
								sampleSize: 32479,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 21,
								sampleSize: 34806,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 15,
								sampleSize: 35461,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 20,
								sampleSize: 36204,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 22,
								sampleSize: 35638,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
						],
					},
					{
						type: 'trun-box',
						version: 0,
						sampleCount: 15,
						dataOffset: 571596,
						firstSampleFlags: 0,
						samples: [
							{
								sampleDuration: 19,
								sampleSize: 34739,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 20,
								sampleSize: 37667,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 21,
								sampleSize: 38552,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 19,
								sampleSize: 40405,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 21,
								sampleSize: 31739,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 21,
								sampleSize: 38907,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 19,
								sampleSize: 40185,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 20,
								sampleSize: 38064,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 21,
								sampleSize: 39193,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 19,
								sampleSize: 48106,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 20,
								sampleSize: 44604,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 21,
								sampleSize: 43817,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 20,
								sampleSize: 42277,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 19,
								sampleSize: 42577,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 22,
								sampleSize: 42531,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
						],
					},
					{
						type: 'trun-box',
						version: 0,
						sampleCount: 15,
						dataOffset: 1189800,
						firstSampleFlags: 0,
						samples: [
							{
								sampleDuration: 19,
								sampleSize: 43887,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 21,
								sampleSize: 47556,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 17,
								sampleSize: 41884,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 22,
								sampleSize: 43477,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 19,
								sampleSize: 39011,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 21,
								sampleSize: 40416,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 19,
								sampleSize: 37371,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 20,
								sampleSize: 43436,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 20,
								sampleSize: 47650,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 20,
								sampleSize: 50298,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 20,
								sampleSize: 50909,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 20,
								sampleSize: 50333,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 19,
								sampleSize: 46131,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 21,
								sampleSize: 45965,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 21,
								sampleSize: 44567,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
						],
					},
					{
						type: 'trun-box',
						version: 0,
						sampleCount: 15,
						dataOffset: 1877567,
						firstSampleFlags: 0,
						samples: [
							{
								sampleDuration: 19,
								sampleSize: 42434,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 19,
								sampleSize: 49748,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 21,
								sampleSize: 46454,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 20,
								sampleSize: 49375,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 20,
								sampleSize: 43717,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 21,
								sampleSize: 40895,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 19,
								sampleSize: 41453,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 21,
								sampleSize: 47487,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 19,
								sampleSize: 40665,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 21,
								sampleSize: 41067,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 19,
								sampleSize: 34668,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 21,
								sampleSize: 37185,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 19,
								sampleSize: 38180,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 21,
								sampleSize: 42641,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 20,
								sampleSize: 39433,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
						],
					},
					{
						type: 'trun-box',
						version: 0,
						sampleCount: 15,
						dataOffset: 2522616,
						firstSampleFlags: 33554432,
						samples: [
							{
								sampleDuration: 19,
								sampleSize: 67472,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 21,
								sampleSize: 46013,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 19,
								sampleSize: 40108,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 20,
								sampleSize: 41730,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 20,
								sampleSize: 41929,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 21,
								sampleSize: 46025,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 19,
								sampleSize: 43761,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 20,
								sampleSize: 44782,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 20,
								sampleSize: 42768,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 20,
								sampleSize: 46552,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 21,
								sampleSize: 52712,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 20,
								sampleSize: 36083,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 20,
								sampleSize: 42177,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 20,
								sampleSize: 42145,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 20,
								sampleSize: 41921,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
						],
					},
					{
						type: 'trun-box',
						version: 0,
						sampleCount: 15,
						dataOffset: 3208462,
						firstSampleFlags: 0,
						samples: [
							{
								sampleDuration: 19,
								sampleSize: 41248,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 21,
								sampleSize: 43176,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 20,
								sampleSize: 49055,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 20,
								sampleSize: 50415,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 21,
								sampleSize: 44389,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 19,
								sampleSize: 35592,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 18,
								sampleSize: 32213,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 21,
								sampleSize: 42150,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 21,
								sampleSize: 43108,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 20,
								sampleSize: 44236,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 20,
								sampleSize: 42755,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 20,
								sampleSize: 40445,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 20,
								sampleSize: 40558,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 20,
								sampleSize: 40620,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 20,
								sampleSize: 42712,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
						],
					},
					{
						type: 'trun-box',
						version: 0,
						sampleCount: 15,
						dataOffset: 3850834,
						firstSampleFlags: 0,
						samples: [
							{
								sampleDuration: 21,
								sampleSize: 47237,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 18,
								sampleSize: 48158,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 21,
								sampleSize: 28881,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 20,
								sampleSize: 43181,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 20,
								sampleSize: 41631,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 20,
								sampleSize: 47021,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 21,
								sampleSize: 51352,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 20,
								sampleSize: 37672,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 20,
								sampleSize: 35197,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 19,
								sampleSize: 48428,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 20,
								sampleSize: 29514,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 20,
								sampleSize: 44782,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 18,
								sampleSize: 45416,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 20,
								sampleSize: 43656,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 20,
								sampleSize: 40893,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
						],
					},
					{
						type: 'trun-box',
						version: 0,
						sampleCount: 15,
						dataOffset: 4498000,
						firstSampleFlags: 0,
						samples: [
							{
								sampleDuration: 22,
								sampleSize: 43937,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 20,
								sampleSize: 38696,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 20,
								sampleSize: 37348,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 20,
								sampleSize: 35711,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 20,
								sampleSize: 40384,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 20,
								sampleSize: 42179,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 20,
								sampleSize: 42086,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 20,
								sampleSize: 42026,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 20,
								sampleSize: 40899,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 21,
								sampleSize: 44084,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 19,
								sampleSize: 43724,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 20,
								sampleSize: 44480,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 20,
								sampleSize: 46755,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 19,
								sampleSize: 44831,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 21,
								sampleSize: 31983,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
						],
					},
					{
						type: 'trun-box',
						version: 0,
						sampleCount: 8,
						dataOffset: 5130444,
						firstSampleFlags: 33554432,
						samples: [
							{
								sampleDuration: 20,
								sampleSize: 85851,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 18,
								sampleSize: 44527,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 22,
								sampleSize: 42151,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 24,
								sampleSize: 43965,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 14,
								sampleSize: 44838,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 21,
								sampleSize: 34661,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 20,
								sampleSize: 54084,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: 1,
								sampleSize: 45308,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
						],
					},
				],
				offset: 1137,
			},
			{
				type: 'regular-box',
				boxType: 'traf',
				boxSize: 1040,
				children: [
					{
						type: 'tfhd-box',
						version: 0,
						trackId: 2,
						baseDataOffset: 0,
						baseSampleDescriptionIndex: 1,
						defaultSampleDuration: 1024,
						defaultSampleSize: 4,
						defaultSampleFlags: 0,
					},
					{
						type: 'tfdt-box',
						version: 1,
						baseMediaDecodeTime: 0,
						offset: 2445,
					},
					{
						type: 'trun-box',
						version: 0,
						sampleCount: 24,
						dataOffset: 562482,
						firstSampleFlags: 0,
						samples: [
							{
								sampleDuration: null,
								sampleSize: 4,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 391,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 490,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 463,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 4,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 441,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 493,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 437,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 431,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 463,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 456,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 408,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 394,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 455,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 376,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 363,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 366,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 362,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 359,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 379,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 365,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 402,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 388,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 424,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
						],
					},
					{
						type: 'trun-box',
						version: 0,
						sampleCount: 24,
						dataOffset: 1174959,
						firstSampleFlags: 0,
						samples: [
							{
								sampleDuration: null,
								sampleSize: 464,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 445,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 414,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 391,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 653,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 650,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 687,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 658,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 630,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 652,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 697,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 684,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 665,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 668,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 602,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 655,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 687,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 655,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 662,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 610,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 656,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 646,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 665,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 645,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
						],
					},
					{
						type: 'trun-box',
						version: 0,
						sampleCount: 24,
						dataOffset: 1862691,
						firstSampleFlags: 0,
						samples: [
							{
								sampleDuration: null,
								sampleSize: 658,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 657,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 644,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 651,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 597,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 689,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 598,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 654,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 647,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 692,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 668,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 647,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 637,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 645,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 642,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 670,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 673,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 672,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 666,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 654,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 622,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 405,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 394,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 394,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
						],
					},
					{
						type: 'trun-box',
						version: 0,
						sampleCount: 24,
						dataOffset: 2512969,
						firstSampleFlags: 0,
						samples: [
							{
								sampleDuration: null,
								sampleSize: 399,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 404,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 399,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 392,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 395,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 390,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 389,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 491,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 397,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 399,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 397,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 389,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 388,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 403,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 383,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 387,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 405,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 383,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 401,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 456,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 450,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 395,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 376,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 379,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
						],
					},
					{
						type: 'trun-box',
						version: 0,
						sampleCount: 24,
						dataOffset: 3198794,
						firstSampleFlags: 0,
						samples: [
							{
								sampleDuration: null,
								sampleSize: 383,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 379,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 384,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 383,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 373,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 451,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 452,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 385,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 387,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 385,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 382,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 381,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 421,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 402,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 394,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 433,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 441,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 465,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 375,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 390,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 379,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 415,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 436,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 392,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
						],
					},
					{
						type: 'trun-box',
						version: 0,
						sampleCount: 24,
						dataOffset: 3841134,
						firstSampleFlags: 0,
						samples: [
							{
								sampleDuration: null,
								sampleSize: 392,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 394,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 373,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 381,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 407,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 370,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 414,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 389,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 365,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 379,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 413,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 470,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 467,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 472,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 429,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 430,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 452,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 404,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 400,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 394,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 380,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 364,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 377,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 384,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
						],
					},
					{
						type: 'trun-box',
						version: 0,
						sampleCount: 24,
						dataOffset: 4483853,
						firstSampleFlags: 0,
						samples: [
							{
								sampleDuration: null,
								sampleSize: 452,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 397,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 440,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 382,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 377,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 370,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 657,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 658,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 683,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 664,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 643,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 645,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 666,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 587,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 626,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 649,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 626,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 617,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 656,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 650,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 695,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 661,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 654,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 692,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
						],
					},
					{
						type: 'trun-box',
						version: 0,
						sampleCount: 20,
						dataOffset: 5117123,
						firstSampleFlags: 0,
						samples: [
							{
								sampleDuration: null,
								sampleSize: 643,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 672,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 655,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 688,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 660,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 682,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 659,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 634,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 680,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 650,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 686,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 678,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 675,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 661,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 690,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 679,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 654,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 660,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 669,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 646,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
						],
					},
					{
						type: 'trun-box',
						version: 0,
						sampleCount: 13,
						dataOffset: 5525829,
						firstSampleFlags: 0,
						samples: [
							{
								sampleDuration: null,
								sampleSize: 644,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 693,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 602,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 393,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 360,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 353,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 414,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 376,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 373,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 367,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 366,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 684,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
							{
								sampleDuration: null,
								sampleSize: 698,
								sampleFlags: null,
								sampleCompositionTimeOffset: null,
							},
						],
					},
				],
				offset: 2409,
			},
		],
		offset: 1113,
	};

	test('Should be able to parse video sample positions from a moof atom', () => {
		const samples = getSamplesFromMoof({
			moofBox: toMoofBox(defaultSamples),
			trackId: 1,
			trexBoxes: [],
		});

		const firstSamples = samples.slice(0, 16);
		const lastSample = samples[samples.length - 1];
		expect(samples.length).toBe(128);

		expect(firstSamples).toEqual([
			{
				offset: 3457,
				decodingTimestamp: 26,
				timestamp: 26,
				duration: 62,
				isKeyframe: true,
				size: 58926,
				chunk: 0,
				bigEndian: false,
				chunkSize: null,
			},
			{
				offset: 62383,
				decodingTimestamp: 88,
				timestamp: 88,
				duration: 1,
				isKeyframe: false,
				size: 61381,
				chunk: 0,
				bigEndian: false,
				chunkSize: null,
			},
			{
				offset: 123764,
				decodingTimestamp: 89,
				timestamp: 89,
				duration: 2,
				isKeyframe: false,
				size: 72911,
				chunk: 0,
				bigEndian: false,
				chunkSize: null,
			},
			{
				offset: 196675,
				decodingTimestamp: 91,
				timestamp: 91,
				duration: 11,
				isKeyframe: false,
				size: 44270,
				chunk: 0,
				bigEndian: false,
				chunkSize: null,
			},
			{
				offset: 240945,
				decodingTimestamp: 102,
				timestamp: 102,
				duration: 15,
				isKeyframe: false,
				size: 33770,
				chunk: 0,
				bigEndian: false,
				chunkSize: null,
			},
			{
				offset: 274715,
				decodingTimestamp: 117,
				timestamp: 117,
				duration: 23,
				isKeyframe: false,
				size: 24302,
				chunk: 0,
				bigEndian: false,
				chunkSize: null,
			},
			{
				offset: 299017,
				decodingTimestamp: 140,
				timestamp: 140,
				duration: 22,
				isKeyframe: false,
				size: 22624,
				chunk: 0,
				bigEndian: false,
				chunkSize: null,
			},
			{
				offset: 321641,
				decodingTimestamp: 162,
				timestamp: 162,
				duration: 23,
				isKeyframe: false,
				size: 18746,
				chunk: 0,
				bigEndian: false,
				chunkSize: null,
			},
			{
				offset: 340387,
				decodingTimestamp: 185,
				timestamp: 185,
				duration: 22,
				isKeyframe: false,
				size: 23021,
				chunk: 0,
				bigEndian: false,
				chunkSize: null,
			},
			{
				offset: 363408,
				decodingTimestamp: 207,
				timestamp: 207,
				duration: 19,
				isKeyframe: false,
				size: 25599,
				chunk: 0,
				bigEndian: false,
				chunkSize: null,
			},
			{
				offset: 389007,
				decodingTimestamp: 226,
				timestamp: 226,
				duration: 23,
				isKeyframe: false,
				size: 32479,
				chunk: 0,
				bigEndian: false,
				chunkSize: null,
			},
			{
				offset: 421486,
				decodingTimestamp: 249,
				timestamp: 249,
				duration: 21,
				isKeyframe: false,
				size: 34806,
				chunk: 0,
				bigEndian: false,
				chunkSize: null,
			},
			{
				offset: 456292,
				decodingTimestamp: 270,
				timestamp: 270,
				duration: 15,
				isKeyframe: false,
				size: 35461,
				chunk: 0,
				bigEndian: false,
				chunkSize: null,
			},
			{
				offset: 491753,
				decodingTimestamp: 285,
				timestamp: 285,
				duration: 20,
				isKeyframe: false,
				size: 36204,
				chunk: 0,
				bigEndian: false,
				chunkSize: null,
			},
			{
				offset: 527957,
				decodingTimestamp: 305,
				timestamp: 305,
				duration: 22,
				isKeyframe: false,
				size: 35638,
				chunk: 0,
				bigEndian: false,
				chunkSize: null,
			},
			{
				timestamp: 327,
				decodingTimestamp: 327,
				duration: 19,
				isKeyframe: true,
				offset: 572709,
				size: 34739,
				chunk: 0,
				bigEndian: false,
				chunkSize: null,
			},
		]);

		expect(lastSample).toEqual({
			timestamp: 2567,
			decodingTimestamp: 2567,
			duration: 1,
			isKeyframe: false,
			offset: 5481634,
			size: 45308,
			chunk: 0,
			bigEndian: false,
			chunkSize: null,
		});
	});

	test('Should be able to parse audio sample positions from a moof atom', () => {
		const samplesFromMoof = getSamplesFromMoof({
			moofBox: toMoofBox(defaultSamples),
			trexBoxes: [],
			trackId: 2,
		});

		const samples = samplesFromMoof.slice(0, 15);
		const lastSample = samplesFromMoof[samplesFromMoof.length - 1];
		expect(samplesFromMoof.length).toBe(201);
		expect(samples).toEqual([
			{
				timestamp: 0,
				decodingTimestamp: 0,
				duration: 1024,
				isKeyframe: true,
				offset: 563595,
				size: 4,
				chunk: 0,
				bigEndian: false,
				chunkSize: null,
			},
			{
				timestamp: 1024,
				decodingTimestamp: 1024,
				duration: 1024,
				isKeyframe: true,
				offset: 563599,
				size: 391,
				chunk: 0,
				bigEndian: false,
				chunkSize: null,
			},
			{
				timestamp: 2048,
				decodingTimestamp: 2048,
				duration: 1024,
				isKeyframe: true,
				offset: 563990,
				size: 490,
				chunk: 0,
				bigEndian: false,
				chunkSize: null,
			},
			{
				timestamp: 3072,
				decodingTimestamp: 3072,
				duration: 1024,
				isKeyframe: true,
				offset: 564480,
				size: 463,
				chunk: 0,
				bigEndian: false,
				chunkSize: null,
			},
			{
				timestamp: 4096,
				decodingTimestamp: 4096,
				duration: 1024,
				isKeyframe: true,
				offset: 564943,
				size: 4,
				chunk: 0,
				bigEndian: false,
				chunkSize: null,
			},
			{
				timestamp: 5120,
				decodingTimestamp: 5120,
				duration: 1024,
				isKeyframe: true,
				offset: 564947,
				size: 441,
				chunk: 0,
				bigEndian: false,
				chunkSize: null,
			},
			{
				timestamp: 6144,
				decodingTimestamp: 6144,
				duration: 1024,
				isKeyframe: true,
				offset: 565388,
				size: 493,
				chunk: 0,
				bigEndian: false,
				chunkSize: null,
			},
			{
				timestamp: 7168,
				decodingTimestamp: 7168,
				duration: 1024,
				isKeyframe: true,
				offset: 565881,
				size: 437,
				chunk: 0,
				bigEndian: false,
				chunkSize: null,
			},
			{
				timestamp: 8192,
				decodingTimestamp: 8192,
				duration: 1024,
				isKeyframe: true,
				offset: 566318,
				size: 431,
				chunk: 0,
				bigEndian: false,
				chunkSize: null,
			},
			{
				timestamp: 9216,
				decodingTimestamp: 9216,
				duration: 1024,
				isKeyframe: true,
				offset: 566749,
				size: 463,
				chunk: 0,
				bigEndian: false,
				chunkSize: null,
			},
			{
				timestamp: 10240,
				decodingTimestamp: 10240,
				duration: 1024,
				isKeyframe: true,
				offset: 567212,
				size: 456,
				chunk: 0,
				bigEndian: false,
				chunkSize: null,
			},
			{
				timestamp: 11264,
				decodingTimestamp: 11264,
				duration: 1024,
				isKeyframe: true,
				offset: 567668,
				size: 408,
				chunk: 0,
				bigEndian: false,
				chunkSize: null,
			},
			{
				timestamp: 12288,
				decodingTimestamp: 12288,
				duration: 1024,
				isKeyframe: true,
				offset: 568076,
				size: 394,
				chunk: 0,
				bigEndian: false,
				chunkSize: null,
			},
			{
				timestamp: 13312,
				decodingTimestamp: 13312,
				duration: 1024,
				isKeyframe: true,
				offset: 568470,
				size: 455,
				chunk: 0,
				bigEndian: false,
				chunkSize: null,
			},
			{
				timestamp: 14336,
				decodingTimestamp: 14336,
				duration: 1024,
				isKeyframe: true,
				offset: 568925,
				size: 376,
				chunk: 0,
				bigEndian: false,
				chunkSize: null,
			},
		]);

		expect(lastSample).toEqual({
			timestamp: 204800,
			decodingTimestamp: 204800,
			duration: 1024,
			isKeyframe: true,
			offset: 5532567,
			size: 698,
			chunk: 0,
			bigEndian: false,
			chunkSize: null,
		});
	});
}
